<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="<%=basePath%>/static/js/jquery-3.3.1.js"></script>
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>/static/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>/static/css/basic.css">
<script src="<%=basePath%>/static/js/bootstrap.min.js"></script>
</head>
<script type="text/javascript">
$(function() {
	$('input:radio:checked').removeAttr("checked");
})
</script>
<body>
	<!--头部-->
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
					aria-expanded="false">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="<%=path%>/reader/reader">欢迎来到图书管理系统</a>
			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse"
				id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav navbar-right">
					<!--<li><a href="javascript:;" class="btn btn-default btn-login">登录</a></li>-->
					<li class="dropdown" style="margin-top: 5px;"><a href="#"
						class="dropdown-toggle" data-toggle="dropdown" role="button"
						aria-haspopup="true" aria-expanded="false"> <span
							class="glyphicon glyphicon-user"></span> 欢迎您， ${reader.name} <span
							class="caret"></span></a>
						<ul class="dropdown-menu" style="margin-top: 2px">
							<li><a href="<%=path%>/">退出</a></li>
						</ul></li>
				</ul>
			</div>
			<!-- /.navbar-collapse -->
		</div>
		<!-- /.container-fluid -->
	</nav>

	<!--主体-->
	<div class="container-fluid" id="main">
		<div class="row">
			<div class="col-md-3 left-content">
				<div class="aside-nav">
					<ul class="list-group aside-nav-list">
					<li class="list-group-item active"><a href="<%=path%>/lesson/reader/chooseTest">在线考试 <span
								class="pull-right glyphicon glyphicon-chevron-right active"></span>
						</a></li>
						<li class="list-group-item "><a
							href="<%=path%>/results/reader/selectResults">个人成绩查询 <span
								class="pull-right glyphicon glyphicon-chevron-right"></span>
						</a></li>
						


						<!--<li class="list-group-item">Dapibus ac facilisis in</li>-->
						<!--<li class="list-group-item">Morbi leo risus</li>-->
						<!--<li class="list-group-item">Porta ac consectetur ac</li>-->
						<!--<li class="list-group-item">Vestibulum at eros</li>-->
					</ul>
				</div>
			</div>
			<div class="col-md-9 right-content">
				<div class="section-wrap">
					<div class="wrap-top">
						<div class="panel panel-default">
							<div class="panel-heading">考试啦</div>
							<div class="panel-body">

								<form class="form-horizontal"
									action="<%=path%>/questions/reader/getResults" method="post">
									<!-- 单选 -->
									<h5>一、单选题</h5>
									<c:forEach items="${questions0}" var="question0" varStatus="xh">
										<label for="name">${xh.count}.${question0.value.question}</label>
										<div class="radio">
											<label> <input type="radio" name="${question0.key}"
												value="A" checked> ${question0.value.operationA}
											</label>
										</div>
										<div class="radio">
											<label> <input type="radio" name="${question0.key}"
												value="B">${question0.value.operationB}
											</label>
										</div>
										<div class="radio">
											<label> <input type="radio" name="${question0.key}"
												value="C">${question0.value.operationC}
											</label>
										</div>
										<div class="radio">
											<label> <input type="radio" name="${question0.key}"
												value="D">${question0.value.operationD}
											</label>
										</div>
										<br />
										<br />
									</c:forEach>

									<!-- 多选 -->
									<h5>二、多选题</h5>
									<c:forEach items="${questions1}" var="question1" varStatus="xh">
										<label for="name">${xh.count}.${question1.value.question}</label>
										<div class="checkbox">
											<label><input type="checkbox" value="A" name="${question1.key}">${question1.value.operationA}</label>
										</div>
										<div class="checkbox">
											<label><input type="checkbox" value="B" name="${question1.key}">${question1.value.operationB}</label>
										</div>
										<div class="checkbox">
											<label><input type="checkbox" value="C" name="${question1.key}">${question1.value.operationC}</label>
										</div>
										<div class="checkbox">
											<label><input type="checkbox" value="D" name="${question1.key}">${question1.value.operationD}</label>
										</div>
										<br />
										<br />
									</c:forEach>
									<br />
									<div class="col-md-3 col-xs-3 col-xs-offset-3 last-form-group">
										<button class="btn btn-default btn-primary" type="submit">交卷</button>
									</div>

								</form>
							</div>
						</div>
					</div>


				</div>
			</div>
		</div>
	</div>
</body>
</html>